<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cppMISC: private__::sslSocket__&lt; impType &gt; 模板类 参考</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript" src="../../darkmode_toggle.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">cppMISC<span id="projectnumber">&#160;v1.1</span>
   </div>
   <div id="projectbrief">cppMisc 文档系统</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="../../d4/da4/namespaceprivate____.html">private__</a></li><li class="navelem"><a class="el" href="../../d3/d70/classprivate_____1_1ssl_socket____.html">sslSocket__</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="../../d2/d1a/classprivate_____1_1ssl_socket____-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">private__::sslSocket__&lt; impType &gt; 模板类 参考</div></div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="../../da/de9/sslsocket_8hpp_source.html">sslsocket.hpp</a>&gt;</code></p>
<div class="dynheader">
类 private__::sslSocket__&lt; impType &gt; 继承关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d7/d4e/classprivate_____1_1ssl_socket______inherit__graph.png" border="0" usemap="#aprivate_____1_1ssl_socket_____3_01imp_type_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="aprivate_____1_1ssl_socket_____3_01imp_type_01_4_inherit__map" id="aprivate_____1_1ssl_socket_____3_01imp_type_01_4_inherit__map">
<area shape="rect" title=" " alt="" coords="5,501,197,1157"/>
<area shape="rect" href="../../dd/df6/structitfc_socket.html" title="TCP客户端的接口定义" alt="" coords="17,5,185,453"/>
<area shape="poly" title=" " alt="" coords="104,468,104,502,99,502,99,468"/>
</map>
</div>
<div class="dynheader">
private__::sslSocket__&lt; impType &gt; 的协作图:</div>
<div class="dyncontent">
<div class="center"><img src="../../de/db1/classprivate_____1_1ssl_socket______coll__graph.png" border="0" usemap="#aprivate_____1_1ssl_socket_____3_01imp_type_01_4_coll__map" alt="Collaboration graph"/></div>
<map name="aprivate_____1_1ssl_socket_____3_01imp_type_01_4_coll__map" id="aprivate_____1_1ssl_socket_____3_01imp_type_01_4_coll__map">
<area shape="rect" title=" " alt="" coords="5,501,197,1157"/>
<area shape="rect" href="../../dd/df6/structitfc_socket.html" title="TCP客户端的接口定义" alt="" coords="17,5,185,453"/>
<area shape="poly" title=" " alt="" coords="104,468,104,502,99,502,99,468"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:a0e1561f6692cb1ccb3e990b4b5561504" id="r_a0e1561f6692cb1ccb3e990b4b5561504"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0e1561f6692cb1ccb3e990b4b5561504">native_socket</a> = itfcSocket::native_socket</td></tr>
<tr class="separator:a0e1561f6692cb1ccb3e990b4b5561504"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a74fc6bbd6e7389aee8bacbac4ee3d606" id="r_a74fc6bbd6e7389aee8bacbac4ee3d606"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a74fc6bbd6e7389aee8bacbac4ee3d606">sslSocket__</a> (const std::string &amp;url, uint16_t port, const std::string &amp;ca, const std::string &amp;cert, const std::string key)</td></tr>
<tr class="memdesc:a74fc6bbd6e7389aee8bacbac4ee3d606"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造sslsocket  <br /></td></tr>
<tr class="separator:a74fc6bbd6e7389aee8bacbac4ee3d606"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09beabb19aa55c7dfc12e5b4502e2ea9" id="r_a09beabb19aa55c7dfc12e5b4502e2ea9"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a09beabb19aa55c7dfc12e5b4502e2ea9">~sslSocket__</a> ()</td></tr>
<tr class="separator:a09beabb19aa55c7dfc12e5b4502e2ea9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d830d8a9ffe7ed2f82f90d5d6768cbd" id="r_a2d830d8a9ffe7ed2f82f90d5d6768cbd"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a2d830d8a9ffe7ed2f82f90d5d6768cbd">connect</a> () final</td></tr>
<tr class="memdesc:a2d830d8a9ffe7ed2f82f90d5d6768cbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">连接服务器  <br /></td></tr>
<tr class="separator:a2d830d8a9ffe7ed2f82f90d5d6768cbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e55451685e7903fac2208de1886059c" id="r_a8e55451685e7903fac2208de1886059c"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a8e55451685e7903fac2208de1886059c">connect</a> (const std::string &amp;url) final</td></tr>
<tr class="memdesc:a8e55451685e7903fac2208de1886059c"><td class="mdescLeft">&#160;</td><td class="mdescRight">连接服务器  <br /></td></tr>
<tr class="separator:a8e55451685e7903fac2208de1886059c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adfa6c24ecbd899cd29351c9074efee02" id="r_adfa6c24ecbd899cd29351c9074efee02"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#adfa6c24ecbd899cd29351c9074efee02">connect</a> (const std::string &amp;url, uint16_t port) final</td></tr>
<tr class="memdesc:adfa6c24ecbd899cd29351c9074efee02"><td class="mdescLeft">&#160;</td><td class="mdescRight">连接服务器  <br /></td></tr>
<tr class="separator:adfa6c24ecbd899cd29351c9074efee02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ba0aeaf869188d5845eaf1b9a2748c6" id="r_a5ba0aeaf869188d5845eaf1b9a2748c6"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a5ba0aeaf869188d5845eaf1b9a2748c6">send</a> (const uint8_t *data, size_t len) final</td></tr>
<tr class="memdesc:a5ba0aeaf869188d5845eaf1b9a2748c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">发送数据内容  <br /></td></tr>
<tr class="separator:a5ba0aeaf869188d5845eaf1b9a2748c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a546f6f8fa1a3308ee418a4ecafe8cf01" id="r_a546f6f8fa1a3308ee418a4ecafe8cf01"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a546f6f8fa1a3308ee418a4ecafe8cf01">close</a> () final</td></tr>
<tr class="memdesc:a546f6f8fa1a3308ee418a4ecafe8cf01"><td class="mdescLeft">&#160;</td><td class="mdescRight">关闭连接  <br /></td></tr>
<tr class="separator:a546f6f8fa1a3308ee418a4ecafe8cf01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47b24a3af08a4dc82fc02166bbe78cbc" id="r_a47b24a3af08a4dc82fc02166bbe78cbc"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a47b24a3af08a4dc82fc02166bbe78cbc">onData</a> (std::function&lt; void(const uint8_t *data, size_t len)&gt; fun) final</td></tr>
<tr class="memdesc:a47b24a3af08a4dc82fc02166bbe78cbc"><td class="mdescLeft">&#160;</td><td class="mdescRight">配置接收数据的回调函数  <br /></td></tr>
<tr class="separator:a47b24a3af08a4dc82fc02166bbe78cbc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac67dd323c90a57dd7cbf07b096f8076e" id="r_ac67dd323c90a57dd7cbf07b096f8076e"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac67dd323c90a57dd7cbf07b096f8076e">onRecv</a> (std::function&lt; void(<a class="el" href="#a0e1561f6692cb1ccb3e990b4b5561504">native_socket</a> fd) &gt; fun) final</td></tr>
<tr class="memdesc:ac67dd323c90a57dd7cbf07b096f8076e"><td class="mdescLeft">&#160;</td><td class="mdescRight">数据接收事件处理,读取数据内容。  <br /></td></tr>
<tr class="separator:ac67dd323c90a57dd7cbf07b096f8076e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a72b9f2bcd4ec8c34ba3bfd14588d82a8" id="r_a72b9f2bcd4ec8c34ba3bfd14588d82a8"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a72b9f2bcd4ec8c34ba3bfd14588d82a8">run</a> (bool sw) final</td></tr>
<tr class="memdesc:a72b9f2bcd4ec8c34ba3bfd14588d82a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">启动异步通讯事件循环.  <br /></td></tr>
<tr class="separator:a72b9f2bcd4ec8c34ba3bfd14588d82a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae27705d5da12581168e0f2fc5b85d915" id="r_ae27705d5da12581168e0f2fc5b85d915"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="#a0e1561f6692cb1ccb3e990b4b5561504">native_socket</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae27705d5da12581168e0f2fc5b85d915">getHandle</a> () final</td></tr>
<tr class="memdesc:ae27705d5da12581168e0f2fc5b85d915"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取本地socket句柄  <br /></td></tr>
<tr class="separator:ae27705d5da12581168e0f2fc5b85d915"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a5c1a5591a8138ed8170d7c9b71a52e" id="r_a3a5c1a5591a8138ed8170d7c9b71a52e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3a5c1a5591a8138ed8170d7c9b71a52e">getPeerCert</a> (const std::string &amp;file)</td></tr>
<tr class="memdesc:a3a5c1a5591a8138ed8170d7c9b71a52e"><td class="mdescLeft">&#160;</td><td class="mdescRight">保存服务器CA证书  <br /></td></tr>
<tr class="separator:a3a5c1a5591a8138ed8170d7c9b71a52e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_structitfc_socket"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pub_methods_structitfc_socket')"><img src="../../closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="../../dd/df6/structitfc_socket.html">itfcSocket</a></td></tr>
<tr class="memitem:a69285d052bcea934fb680b5840dba587 inherit pub_methods_structitfc_socket" id="r_a69285d052bcea934fb680b5840dba587"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/df6/structitfc_socket.html#a69285d052bcea934fb680b5840dba587">onRecv</a> (std::function&lt; void(native_socket fd) &gt; fun)=0</td></tr>
<tr class="separator:a69285d052bcea934fb680b5840dba587 inherit pub_methods_structitfc_socket"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;typename impType&gt;<br />
class private__::sslSocket__&lt; impType &gt;</div>
<p class="definition">在文件 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html">sslsocket.hpp</a> 第 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html#l00029">29</a> 行定义.</p>
</div><h2 class="groupheader">成员类型定义说明</h2>
<a id="a0e1561f6692cb1ccb3e990b4b5561504" name="a0e1561f6692cb1ccb3e990b4b5561504"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e1561f6692cb1ccb3e990b4b5561504">&#9670;&#160;</a></span>native_socket</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename impType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="../../d3/d70/classprivate_____1_1ssl_socket____.html">private__::sslSocket__</a>&lt; impType &gt;::native_socket = itfcSocket::native_socket</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html">sslsocket.hpp</a> 第 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html#l00032">32</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">构造及析构函数说明</h2>
<a id="a74fc6bbd6e7389aee8bacbac4ee3d606" name="a74fc6bbd6e7389aee8bacbac4ee3d606"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a74fc6bbd6e7389aee8bacbac4ee3d606">&#9670;&#160;</a></span>sslSocket__()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename impType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d70/classprivate_____1_1ssl_socket____.html">private__::sslSocket__</a>&lt; impType &gt;::sslSocket__ </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>url</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t</td>          <td class="paramname"><span class="paramname"><em>port</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>ca</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>cert</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string</td>          <td class="paramname"><span class="paramname"><em>key</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>构造sslsocket </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">url[</td><td>I ] </td></tr>
    <tr><td class="paramname">port[</td><td>I ] </td></tr>
    <tr><td class="paramname">ca[</td><td>I ] </td></tr>
    <tr><td class="paramname">cert[</td><td>I ] </td></tr>
    <tr><td class="paramname">key[</td><td>I ] </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html">sslsocket.hpp</a> 第 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html#l00138">138</a> 行定义.</p>

</div>
</div>
<a id="a09beabb19aa55c7dfc12e5b4502e2ea9" name="a09beabb19aa55c7dfc12e5b4502e2ea9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a09beabb19aa55c7dfc12e5b4502e2ea9">&#9670;&#160;</a></span>~sslSocket__()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename impType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d3/d70/classprivate_____1_1ssl_socket____.html">private__::sslSocket__</a>&lt; impType &gt;::~<a class="el" href="../../d3/d70/classprivate_____1_1ssl_socket____.html">sslSocket__</a> </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html">sslsocket.hpp</a> 第 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html#l00164">164</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a546f6f8fa1a3308ee418a4ecafe8cf01" name="a546f6f8fa1a3308ee418a4ecafe8cf01"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a546f6f8fa1a3308ee418a4ecafe8cf01">&#9670;&#160;</a></span>close()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename impType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="../../d3/d70/classprivate_____1_1ssl_socket____.html">private__::sslSocket__</a>&lt; impType &gt;::close </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>关闭连接 </p>

<p>实现了 <a class="el" href="../../dd/df6/structitfc_socket.html#ad2f66521e7eeb5ab6b1c9392da52f4c8">itfcSocket</a>.</p>

<p class="definition">在文件 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html">sslsocket.hpp</a> 第 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html#l00291">291</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d3/d70/classprivate_____1_1ssl_socket_____a546f6f8fa1a3308ee418a4ecafe8cf01_icgraph.png" border="0" usemap="#ad3/d70/classprivate_____1_1ssl_socket_____a546f6f8fa1a3308ee418a4ecafe8cf01_icgraph" alt=""/></div>
<map name="ad3/d70/classprivate_____1_1ssl_socket_____a546f6f8fa1a3308ee418a4ecafe8cf01_icgraph" id="ad3/d70/classprivate_____1_1ssl_socket_____a546f6f8fa1a3308ee418a4ecafe8cf01_icgraph">
<area shape="rect" title="关闭连接" alt="" coords="194,5,334,48"/>
<area shape="rect" href="../../d3/d70/classprivate_____1_1ssl_socket____.html#a3a5c1a5591a8138ed8170d7c9b71a52e" title="保存服务器CA证书" alt="" coords="5,5,146,48"/>
<area shape="poly" title=" " alt="" coords="178,29,146,29,146,24,178,24"/>
</map>
</div>

</div>
</div>
<a id="a2d830d8a9ffe7ed2f82f90d5d6768cbd" name="a2d830d8a9ffe7ed2f82f90d5d6768cbd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2d830d8a9ffe7ed2f82f90d5d6768cbd">&#9670;&#160;</a></span>connect() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename impType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="../../d3/d70/classprivate_____1_1ssl_socket____.html">private__::sslSocket__</a>&lt; impType &gt;::connect </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>连接服务器 </p>
<dl class="section return"><dt>返回</dt><dd>成功操作返回true，否则返回false </dd></dl>

<p>实现了 <a class="el" href="../../dd/df6/structitfc_socket.html#a1777749b032759546aec3b01d12e4956">itfcSocket</a>.</p>

<p class="definition">在文件 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html">sslsocket.hpp</a> 第 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html#l00181">181</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d3/d70/classprivate_____1_1ssl_socket_____a2d830d8a9ffe7ed2f82f90d5d6768cbd_icgraph.png" border="0" usemap="#ad3/d70/classprivate_____1_1ssl_socket_____a2d830d8a9ffe7ed2f82f90d5d6768cbd_icgraph" alt=""/></div>
<map name="ad3/d70/classprivate_____1_1ssl_socket_____a2d830d8a9ffe7ed2f82f90d5d6768cbd_icgraph" id="ad3/d70/classprivate_____1_1ssl_socket_____a2d830d8a9ffe7ed2f82f90d5d6768cbd_icgraph">
<area shape="rect" title="连接服务器" alt="" coords="194,5,334,48"/>
<area shape="rect" href="../../d3/d70/classprivate_____1_1ssl_socket____.html#a8e55451685e7903fac2208de1886059c" title="连接服务器" alt="" coords="5,5,146,48"/>
<area shape="poly" title=" " alt="" coords="178,29,146,29,146,24,178,24"/>
</map>
</div>

</div>
</div>
<a id="a8e55451685e7903fac2208de1886059c" name="a8e55451685e7903fac2208de1886059c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8e55451685e7903fac2208de1886059c">&#9670;&#160;</a></span>connect() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename impType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="../../d3/d70/classprivate_____1_1ssl_socket____.html">private__::sslSocket__</a>&lt; impType &gt;::connect </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>url</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>连接服务器 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">url[</td><td>I ], 标准的URL格式字符串 </td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="../../dd/df6/structitfc_socket.html#acb64626726a7c6458504cff01c8b470b">itfcSocket</a>.</p>

<p class="definition">在文件 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html">sslsocket.hpp</a> 第 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html#l00222">222</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d3/d70/classprivate_____1_1ssl_socket_____a8e55451685e7903fac2208de1886059c_cgraph.png" border="0" usemap="#ad3/d70/classprivate_____1_1ssl_socket_____a8e55451685e7903fac2208de1886059c_cgraph" alt=""/></div>
<map name="ad3/d70/classprivate_____1_1ssl_socket_____a8e55451685e7903fac2208de1886059c_cgraph" id="ad3/d70/classprivate_____1_1ssl_socket_____a8e55451685e7903fac2208de1886059c_cgraph">
<area shape="rect" title="连接服务器" alt="" coords="5,64,146,107"/>
<area shape="rect" href="../../d3/d70/classprivate_____1_1ssl_socket____.html#a2d830d8a9ffe7ed2f82f90d5d6768cbd" title="连接服务器" alt="" coords="194,5,334,48"/>
<area shape="poly" title=" " alt="" coords="145,61,178,51,180,56,147,66"/>
<area shape="rect" href="../../d6/dfe/class_u_r_l.html#aec6611f5fb54f750042dd4e9aa882e06" title=" " alt="" coords="204,72,324,99"/>
<area shape="poly" title=" " alt="" coords="146,83,189,83,189,88,146,88"/>
<area shape="rect" href="../../d6/dfe/class_u_r_l.html#a27f805923f375af79e31cd8c9e3bf951" title=" " alt="" coords="210,123,318,149"/>
<area shape="poly" title=" " alt="" coords="147,102,197,115,196,121,145,107"/>
</map>
</div>

</div>
</div>
<a id="adfa6c24ecbd899cd29351c9074efee02" name="adfa6c24ecbd899cd29351c9074efee02"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adfa6c24ecbd899cd29351c9074efee02">&#9670;&#160;</a></span>connect() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename impType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="../../d3/d70/classprivate_____1_1ssl_socket____.html">private__::sslSocket__</a>&lt; impType &gt;::connect </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>url</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t</td>          <td class="paramname"><span class="paramname"><em>port</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>连接服务器 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">url[</td><td>I ],服务器地址 </td></tr>
    <tr><td class="paramname">port[</td><td>I ], 服务器监听端口 </td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="../../dd/df6/structitfc_socket.html#ae54a7448b24a67b20a662592784112f6">itfcSocket</a>.</p>

<p class="definition">在文件 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html">sslsocket.hpp</a> 第 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html#l00239">239</a> 行定义.</p>

</div>
</div>
<a id="ae27705d5da12581168e0f2fc5b85d915" name="ae27705d5da12581168e0f2fc5b85d915"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae27705d5da12581168e0f2fc5b85d915">&#9670;&#160;</a></span>getHandle()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename impType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="#a0e1561f6692cb1ccb3e990b4b5561504">native_socket</a> <a class="el" href="../../d3/d70/classprivate_____1_1ssl_socket____.html">private__::sslSocket__</a>&lt; impType &gt;::getHandle </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取本地socket句柄 </p>

<p>实现了 <a class="el" href="../../dd/df6/structitfc_socket.html#a625dcd5ca7cc970bc09450e5c257c572">itfcSocket</a>.</p>

<p class="definition">在文件 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html">sslsocket.hpp</a> 第 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html#l00329">329</a> 行定义.</p>

</div>
</div>
<a id="a3a5c1a5591a8138ed8170d7c9b71a52e" name="a3a5c1a5591a8138ed8170d7c9b71a52e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a5c1a5591a8138ed8170d7c9b71a52e">&#9670;&#160;</a></span>getPeerCert()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename impType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="../../d3/d70/classprivate_____1_1ssl_socket____.html">private__::sslSocket__</a>&lt; impType &gt;::getPeerCert </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>file</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>保存服务器CA证书 </p>

<p class="definition">在文件 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html">sslsocket.hpp</a> 第 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html#l00337">337</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d3/d70/classprivate_____1_1ssl_socket_____a3a5c1a5591a8138ed8170d7c9b71a52e_cgraph.png" border="0" usemap="#ad3/d70/classprivate_____1_1ssl_socket_____a3a5c1a5591a8138ed8170d7c9b71a52e_cgraph" alt=""/></div>
<map name="ad3/d70/classprivate_____1_1ssl_socket_____a3a5c1a5591a8138ed8170d7c9b71a52e_cgraph" id="ad3/d70/classprivate_____1_1ssl_socket_____a3a5c1a5591a8138ed8170d7c9b71a52e_cgraph">
<area shape="rect" title="保存服务器CA证书" alt="" coords="5,5,146,48"/>
<area shape="rect" href="../../d3/d70/classprivate_____1_1ssl_socket____.html#a546f6f8fa1a3308ee418a4ecafe8cf01" title="关闭连接" alt="" coords="194,5,334,48"/>
<area shape="poly" title=" " alt="" coords="146,24,178,24,178,29,146,29"/>
</map>
</div>

</div>
</div>
<a id="a47b24a3af08a4dc82fc02166bbe78cbc" name="a47b24a3af08a4dc82fc02166bbe78cbc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47b24a3af08a4dc82fc02166bbe78cbc">&#9670;&#160;</a></span>onData()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename impType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="../../d3/d70/classprivate_____1_1ssl_socket____.html">private__::sslSocket__</a>&lt; impType &gt;::onData </td>
          <td>(</td>
          <td class="paramtype">std::function&lt; void(const uint8_t *data, size_t len)&gt;</td>          <td class="paramname"><span class="paramname"><em>fun</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>配置接收数据的回调函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">fun[</td><td>I ]，回调函数对象, 函数原型为 void callback( const uint8_t * data , size_t len ); </td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="../../dd/df6/structitfc_socket.html#a239bf4c19c4484d3ebcda9caff837a60">itfcSocket</a>.</p>

<p class="definition">在文件 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html">sslsocket.hpp</a> 第 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html#l00303">303</a> 行定义.</p>

</div>
</div>
<a id="ac67dd323c90a57dd7cbf07b096f8076e" name="ac67dd323c90a57dd7cbf07b096f8076e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac67dd323c90a57dd7cbf07b096f8076e">&#9670;&#160;</a></span>onRecv()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename impType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="../../d3/d70/classprivate_____1_1ssl_socket____.html">private__::sslSocket__</a>&lt; impType &gt;::onRecv </td>
          <td>(</td>
          <td class="paramtype">std::function&lt; void(<a class="el" href="#a0e1561f6692cb1ccb3e990b4b5561504">native_socket</a> fd) &gt;</td>          <td class="paramname"><span class="paramname"><em>fun</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>数据接收事件处理,读取数据内容。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">fun[</td><td>I ] </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html">sslsocket.hpp</a> 第 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html#l00310">310</a> 行定义.</p>

</div>
</div>
<a id="a72b9f2bcd4ec8c34ba3bfd14588d82a8" name="a72b9f2bcd4ec8c34ba3bfd14588d82a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a72b9f2bcd4ec8c34ba3bfd14588d82a8">&#9670;&#160;</a></span>run()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename impType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="../../d3/d70/classprivate_____1_1ssl_socket____.html">private__::sslSocket__</a>&lt; impType &gt;::run </td>
          <td>(</td>
          <td class="paramtype">bool</td>          <td class="paramname"><span class="paramname"><em>sw</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>启动异步通讯事件循环. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">sw[</td><td>I ], true启动,false关闭 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>注解</dt><dd>**** 这个函数应该在建立ssl连接之后调用。在SSL握手期间一定不能启动，否则容易握手失败 </dd></dl>

<p>实现了 <a class="el" href="../../dd/df6/structitfc_socket.html#a40e80971cd347acf37851173c1e6b07a">itfcSocket</a>.</p>

<p class="definition">在文件 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html">sslsocket.hpp</a> 第 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html#l00319">319</a> 行定义.</p>

</div>
</div>
<a id="a5ba0aeaf869188d5845eaf1b9a2748c6" name="a5ba0aeaf869188d5845eaf1b9a2748c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5ba0aeaf869188d5845eaf1b9a2748c6">&#9670;&#160;</a></span>send()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename impType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t <a class="el" href="../../d3/d70/classprivate_____1_1ssl_socket____.html">private__::sslSocket__</a>&lt; impType &gt;::send </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *</td>          <td class="paramname"><span class="paramname"><em>data</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>len</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>发送数据内容 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data[</td><td>I ],要发送的数据内容 </td></tr>
    <tr><td class="paramname">len[</td><td>I ],要发送的数据长度 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功操作返回发送的数据长度 </dd></dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::runtime_error</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="../../dd/df6/structitfc_socket.html#a1769a8c961b5163ce0ee26d1ff4278d1">itfcSocket</a>.</p>

<p class="definition">在文件 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html">sslsocket.hpp</a> 第 <a class="el" href="../../da/de9/sslsocket_8hpp_source.html#l00281">281</a> 行定义.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>include/<a class="el" href="../../da/de9/sslsocket_8hpp_source.html">sslsocket.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
